from django.shortcuts import render, HttpResponse

# Create your views here.
def get_user(request):
    return HttpResponse('普通URL-user/')

def user_info(request):
    return HttpResponse('URL上有多个斜杠-user/info/')

def user_id(request, id):
    return HttpResponse(f'URL上有多个斜杠-user/id/, 值为:{id}')

def user_id_gender(request,id,gender):
    return HttpResponse(f'URL上有多个斜杠-user/id/, 值为:{id} == {gender}')


def user_name(request, name):
    print('='*30)
    print(type(name))
    print('='*30)
    return HttpResponse(f'URL上有多个斜杠-user/path/, 值为:{name}')

def user_path(request, path):
    print('='*30)
    print(path)
    print('='*30)
    return HttpResponse(f'URL上有多个斜杠-user/path/, 值为:{path}')


def page_not_found(request, exception):
    return HttpResponse('自定义的404错误页面')